{% extends 'categories/news/detail.html'%}

  {% block categories %}
  <div class="gearContainer">
	<p style="margin:0px; padding:2px 10px 1px 10px; background-color:#999999; font-size:9pt; font-weight:700; color:#FFFFFF;">{{category.name}}</p>
	<div class="gearContentBoxNews">
	  <div class="inset">
		{% load hierarchies %} 
		{% get_category thehub as hub_category %} 
		{% for cat in hub_category.child.all%} 
		<p class="newsList"><a href="{{cat.get_absolute_url}}">{{cat.name}}</a></p>
		{% endfor %}
	  </div>
	</div>
  </div>
  {% endblock %}
  {% block all_news %}
  <div class="gearContainer">
	<p style="margin:0px; padding:2px 10px 1px 10px; background-color:#999999; font-size:9pt; font-weight:700; color:#FFFFFF;">Other News</p>
	<div class="gearContentBoxNews">
	  <div class="inset">
		{% load hierarchies %}
		{% get_top_categories News as categories thehub %}
		{% for cat in categories %}
		    <p class="newsList"><a href="{% url category_detail cat.slug_path %}">{{cat.name}}</a></p>
		{% endfor %}
	  </div>
	</div>
  </div>
  {% endblock %}

  {% block middle_pane %}
  <div class="body">
	{% load alerts %}
	{% get_alerts category.id as alert_list %}
	{% for alert in alert_list %}
	<div id="alert_{{forloop.counter}}" style="background-color:red; border: 1px solid #666; margin-bottom:4px">
	<a class="alert_link" href="#" style="float:left; padding:2px; text-decoration:none;" onclick="$('#alert_{{forloop.counter}}').slideUp('slow')" >X</a>
	<div align="center" style="padding:10px">
		{{alert}}
	</div>
	</div>
	{% endfor %}
	<div class="gearContainer">
	  {% ifequal  category.slug 'thehub' %}
	  	  <div style="background-color:#E6E6E6; padding:0px; border-left:1px solid #cccccc; border-right:1px solid #cccccc; border-top:1px solid #cccccc; border-bottom:1px solid #cccccc; " align=center>
		  {% if category.image %} 
		  <img src="{{category.image.url}}" alt="the Hub" width="{{category.image.width}}" height="{{category.image.height}}" border="0" />
		  {% endif %}
		  </div>
	  {% else %}
	  <div style="font-size:14pt; font-weight:700; color:#666666; background-color:#e6e6e6; padding:2px 6px 2px 6px; border:1px solid #cccccc;">
	  <a href="{% url category_detail "news/thehub" %}"><img src="{{MEDIA_URL}}img/img_thehub_sm.jpg" alt="the Hub" width="132" height="30" border="0" style="margin-bottom:2px;" /></a>
	  <br />
      {{ category.name }}
      </div>
	  {% endifequal %}
	</div>

	<div class="gearContainer">
	  <div class="titlebarNews">
		<div class="pre"></div>
		<div class="title">Top Stories</div>
		<div class="titleModes">
			{% if perms.category.top_story_editor %}<div class="edit"><a class="modelink" href="{% url category_top_stories category.slug_path %}">Edit</a></div> {% endif %}
			<!--<div class="help"><a class="modelink" href="">Help</a></div> -->
			<div class="clear"></div>
		</div>
		<div class="post"></div>
		<div class="clear"></div>
	  </div>

	  <div class="gearContent">
	  <div id="newsHeadlines">
		{% for top in top_list %}
		{% if forloop.first %}
		<div class="main">
		  <div class="thumbnail"><!-- TODO: Implement thumbnail display --></div>
		  <span class="title"><a href="{% url category_content_detail category.slug_path top.id%}">{{top.title}}</a></span><span class="date">06/27/2008</span><br />
		  {{top.content|safe|striptags|truncatewords:50}}</span>
		  <div style="clear:right;"></div>
		</div>
		{% else %}
		<div class="sub">
		  <div class="thumbnail"><!-- TODO: Implement thumbnail display --></div>
		  <span class="title"><a href="{% url category_content_detail category.slug_path top.id%}">{{top.title}}</a></span><span class="date">06/06/2008</span><br />
		  {{top.content|safe|striptags|truncatewords:50}}
		  <div style="clear:right;"></div>
		</div>
		{% endif %}
		{% endfor %}
	  </div>
	  </div>

	</div>

	<div class="gearContainer">
	  <div class="titlebarNews">
		<div class="pre"></div>
		<div class="title">More Stories</div>
		<div class="titleModes">
		  <!--<div class="edit"><a class="modelink" href="">Edit</a></div> -->
		  <!--<div class="help"><a class="modelink" href="">Help</a></div> -->
		  <div class="clear"></div>
		</div>
		<div class="post"></div>
		<div class="clear"></div>
	  </div>

	  <div class="gearContent">
		{% for more in more_list%}
		<p class="newsList"><a href="{% url category_content_detail category.slug_path more.id%}">{{more.title}}</a> <span class="smaller">{{more.created|date:"F j"}}</span></p>
		{% endfor %}
		<div class="formReadAll" style="width:50px; margin-top:10px; height:12px; padding-top:3px;"><a style="text-decoration:none" href={% url hierarchies.views.category_index category.slug_path %}>View All</a></div>
		<!--  <form><input name="readall" type="submit" class="formReadAll" onClick="MM_goToURL('parent','thehub_org_nmg.html');return document.MM_returnValue" value="View All" /></form>-->
	  </div>
	</div>
  </div>
  {% endblock %}



